package blog.web.user;

import blog.sys.data.user.UserInfoData;
import blog.sys.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import pub.spring.web.mvc.ActionResult;

@Controller
public class InfoController {

    /**
     * 获取用户信息
     * @param userId
     * @return
     */
    @RequestMapping
    public ActionResult onGetUserInfoShow(Integer userId) {

        UserInfoData data = userInfoService.onGetUserInfoShowService(userId);

        ActionResult result = ActionResult.ok();
        result.setData(data);
        return result;

    }

    @Autowired
    private UserInfoService userInfoService;

}
